package main

import (
	"fmt"
	"net/http"
)

type MyHandler struct {
}

func (h MyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, "hello serve http")
}

func main() {
	fmt.Println("Hello, World!")
	var h MyHandler
	//err := http.ListenAndServe(":8080", h)

	http.Handle("/test", h)
	http.Handle("/test2", http.Handler(h))
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		fmt.Println("err", err)
	}
}
